﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="List.ascx.vb" Inherits="Control_MaSoThue_List" %>
<script type="text/javascript">

    function SetDownFile(aURL) {
        document.getElementById('expFile').src = aURL;
        return false;
    }
    $(function () {
        $(".SubjectTitle input, .SubjectTitle select").keypress(function (e) {
            if (e.keyCode == 13) {
                $("#<%=btnSearch.ClientID()%>").click();
                return false;
            }
        });

        //check cookie to show or hide search pannel
        if ($.cookie('CookieSiteSearch') == 1) {
            $('#pnlSearch').show();
        }
        else {
            $('#pnlSearch').hide();
        }
        $('#B1').click(function (event) {
            //set cookie
            if ($.cookie('CookieSiteSearch') == 1) {
                $.cookie('CookieSiteSearch', 0)
            }
            else {
                $.cookie('CookieSiteSearch', 1)
            }
            $('#pnlSearch').slideToggle(500);
            if ($('#imgShowHide').attr("src") == "../../images/arrow_popup.gif") {
                $('#imgShowHide').attr("src", "../../images/arrow_showless.gif");
            }
            else {
                $('#imgShowHide').attr("src", "../../images/arrow_popup.gif");
            }
        });
    });
</script>
<div class="content_porletform">
    <div class="HeadTitle">
        <h3>
            QUẢN LÝ MÃ SỐ THUẾ</h3>
    </div>
    <div class="box_contentform">
        <div class="box_scroll_grid">
            <div class="SubjectTitle" id="SInfor" runat="server">
                <legend class="SubjectTitle">
                    <img alt="" src="../../images/arrow_showless.gif" id="img1" />
                    <a id="B1" href="#">Tìm kiếm</a>&nbsp;&nbsp;</legend>
            </div>
            <div id="pnlSearch" class="SubjectTitle">
                <div class="DivRow">
                    <div class="Div-Left">
                        <div class="DivLabelSearch" style="width: 150px">
                            Mã số GCN:
                        </div>
                        <div class="DivTextBox">
                            <asp:TextBox ID="txtCertifiedcode" CssClass="TextBox" runat="server" Text="" />
                        </div>
                    </div>
                    <div class="Div-Right">
                    </div>
                </div>
                <div class="DivRow">
                    <div class="Div-Left">
                        <div class="DivLabelSearch" style="width: 150px">
                            Ngày cấp chứng nhận:
                        </div>
                        <div class="DivTextBox">
                            <asp:TextBox ID="txtCertifieddateFrom" CssClass="TextBox Date" Width="85px" runat="server"
                                Text="" />
                            tới :
                            <asp:TextBox ID="txtCertifieddateTo" CssClass="TextBox Date" Width="85px" runat="server"
                                Text="" />
                        </div>
                    </div>
                    <div class="Div-Right">
                    </div>
                </div>
                <div class="DivRow">
                    <div class="Div-Left">
                        <div class="DivLabelSearch" style="width: 150px">
                            Tên hộ (Bảng hiệu):
                        </div>
                        <div class="DivTextBox">
                            <asp:TextBox ID="txtBiz_vietname" CssClass="TextBox" runat="server" Text="" />
                        </div>
                    </div>
                    <div class="Div-Right">
                    </div>
                </div>
                <div style="clear: both">
                </div>
                <div class="DivRow">
                    <div class="Div-Left">
                        <div class="DivLabelSearch" style="width: 150px">
                            Địa điểm kinh doanh:
                        </div>
                        <div class="DivTextBox">
                            <asp:TextBox ID="txtBiz_HeadOffice" CssClass="TextBox" runat="server" Text="" />
                        </div>
                    </div>
                    <div class="Div-Right">
                    </div>
                </div>
                <div style="clear: both">
                </div>
                <div class="DivRow">
                    <div class="Div-Left">
                        <div class="DivLabelSearch" style="width: 150px">
                            CMND số:
                        </div>
                        <div class="DivTextBox">
                            <asp:TextBox ID="txtOw_cardid" CssClass="TextBox" runat="server" Text="" />
                        </div>
                    </div>
                    <div class="Div-Right">
                    </div>
                </div>
                <div style="clear: both">
                </div>
                <div class="DivRow">
                    <div class="Div-Left">
                        <div class="DivLabelSearch" style="width: 150px">
                            Mã số thuế:
                        </div>
                        <div class="DivTextBox">
                            <asp:TextBox ID="txtOw_TaxCode" CssClass="TextBox" runat="server" Text="" />
                        </div>
                    </div>
                    <div class="Div-Right">
                    </div>
                </div>
                <div style="clear: both">
                </div>
                <div class="DivRow">
                    <div class="Div-Left">
                        <div class="DivLabelSearch" style="width: 150px">
                            Tình trạng:
                        </div>
                        <div class="DivTextBox">
                            <asp:DropDownList runat="server" CssClass="DropDownList" Width="245px" ID="ddlTinhTrangMST">
                                <asp:ListItem Value="-1" Text="---Tất cả---" />
                                <asp:ListItem Value="0" Text="Chưa cấp" />
                                <asp:ListItem Value="1" Text="Đã cấp" />
                            </asp:DropDownList>
                        </div>
                    </div>
                    <div class="Div-Right">
                    </div>
                </div>
                <div class="DivRow">
                    <div class="Div-Left">
                        <div class="DivLabelSearch" style="width: 150px">
                            Trạng thái:
                        </div>
                        <div class="DivTextBox">
                            <asp:DropDownList runat="server" CssClass="DropDownList" Width="245px" ID="ddlTrangThai">
                            </asp:DropDownList>
                        </div>
                    </div>
                    <div class="Div-Right">
                    </div>
                </div>
                <div style="clear: both; height: 10px;">
                </div>
                <div class="DivRow">
                    <div class="DivLabelSearch" style="width: 150px">
                        &nbsp;&nbsp;&nbsp;</div>
                    <div class="DivTextBox">
                        <asp:Button ID="btnSearch" runat="server" Text=" Tìm kiếm" CssClass="btn" />
                        <asp:Button ID="btnReset" runat="server" Text="Hủy" CssClass="btn" />
                        <asp:Button ID="btnExportExcel" runat="server" Text=" Xuất excel" CssClass="btn" />
                    </div>
                </div>
                <div style="clear: both; height: 10px">
                </div>
            </div>
            <div style="clear: both; height: 10px">
            </div>
            <asp:GridView ID="grdShow" runat="server" AutoGenerateColumns="False" EmptyDataText="{Không có dữ liệu}"
                AllowPaging="false" Width='100%' BorderWidth="1px" CssClass="GridBorder">
                <Columns>
                    <asp:TemplateField>
                        <ItemTemplate>
                            <asp:HyperLink ID="hplCapNhat" runat="server" Text="Cập nhật" Style="cursor: pointer;"></asp:HyperLink>&nbsp;|&nbsp;
                            <asp:HyperLink ID="hplNgungMST" runat="server" Text="Ngưng" Style="cursor: pointer;"></asp:HyperLink>
                        </ItemTemplate>
                        <ItemStyle CssClass="GridTextLink" HorizontalAlign="Center" Width="10%" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Stt">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lblSTT" Text=''></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="4%" HorizontalAlign="Left" />
                    </asp:TemplateField>
                    <asp:TemplateField HeaderText="Tên CSKD">
                        <ItemTemplate>
                            <asp:HyperLink ID="hplBiz_VietName" runat="server"></asp:HyperLink>
                        </ItemTemplate>
                        <ItemStyle Width='8%' />
                    </asp:TemplateField>
                    <asp:BoundField DataField='Biz_HeadOffice' HeaderText='Địa chỉ kinh doanh'>
                        <ItemStyle Width='8%' />
                    </asp:BoundField>
                    <asp:BoundField DataField='Ow_Name' HeaderText='Tên chủ CSKD'>
                        <ItemStyle Width='8%' />
                    </asp:BoundField>
                    <asp:BoundField DataField='Ow_Resident' HeaderText='Địa Chỉ Thường trú'>
                        <ItemStyle Width='8%' />
                    </asp:BoundField>
                    <asp:BoundField DataField='Ow_CardID' HeaderText='Số CMND'>
                        <ItemStyle Width='8%' />
                    </asp:BoundField>
                    <asp:BoundField DataField='Ow_CardDate' HeaderText='Ngày cấp' DataFormatString='{0:dd/MM/yyyy}'>
                        <ItemStyle Width='8%' />
                    </asp:BoundField>
                    <asp:BoundField DataField='Ow_TaxCode' HeaderText='MST'>
                        <ItemStyle Width='8%' />
                    </asp:BoundField>
                    <asp:BoundField DataField='CertifiedCode' HeaderText='Giấy CN'>
                        <ItemStyle Width='8%' />
                    </asp:BoundField>
                    <asp:BoundField DataField='Ow_CardID' HeaderText='CMND'>
                        <ItemStyle Width='8%' />
                    </asp:BoundField>
                    <asp:BoundField DataField='TinhTrang' HeaderText='Tình Trạng MST'>
                        <ItemStyle Width='8%' />
                    </asp:BoundField>
                    <asp:TemplateField HeaderText="Trạng thái">
                        <ItemTemplate>
                            <asp:Label runat="server" ID="lblStatusId" Text=''></asp:Label>
                        </ItemTemplate>
                        <ItemStyle Width="8%" HorizontalAlign="Left" />
                    </asp:TemplateField>
                </Columns>
                <HeaderStyle Height="26px" HorizontalAlign="Left" CssClass="GridHeader" />
                <RowStyle CssClass="GridRow" Height="23px" />
                <AlternatingRowStyle CssClass="GridAlterRow" />
                <PagerStyle CssClass="GridPaged" HorizontalAlign="Right" Height="23px" />
                <PagerSettings Mode="Numeric" PageButtonCount="2" />
                <EmptyDataRowStyle CssClass="GridTextEmpty" HorizontalAlign="Center" />
            </asp:GridView>
            <div style="clear: both; height: 5px">
            </div>
            <div>
                <%--<asp:Button ID="btnDelete" CssClass="btn" runat="server" Text="Xóa" />--%>
                <asp:Label ID="lblPage_Size" runat="server" Text="Số bản ghi trên trang:"></asp:Label>
                <asp:DropDownList ID="drpPage_Size" runat="server" AutoPostBack="True" Width="70px"
                    CssClass="input_form">
                    <asp:ListItem Text="10" Value="10" Selected></asp:ListItem>
                    <asp:ListItem Text="20" Value="20"></asp:ListItem>
                    <asp:ListItem Text="50" Value="50"></asp:ListItem>
                    <asp:ListItem Text="100" Value="100"></asp:ListItem>
                </asp:DropDownList>
                <asp:Label ID="lblTotal" runat="server"></asp:Label></div>
            <div style="width: 100%">
                <!--phan trang-->
                <div id="results_resultsNavigationDiv" class="paginationEMP">
                    <ul>
                        <asp:LinkButton ID="lnkFirst" runat="server"></asp:LinkButton>
                        <asp:Repeater ID="rptPage" runat="server">
                            <ItemTemplate>
                                <asp:LinkButton ID="lnkTitle" CssClass="page_num" runat="server" OnClick="lnkTitle_Click"></asp:LinkButton>
                            </ItemTemplate>
                        </asp:Repeater>
                        <asp:LinkButton ID="lnkLast" runat="server"></asp:LinkButton>
                    </ul>
                </div>
                <asp:HiddenField ID="hidCount" Value="0" runat="server" />
                <asp:HiddenField ID="hidIndex_page" Value="0" runat="server" />
                <asp:HiddenField ID="hidCur_Page" Value="1" runat="server" />
            </div>
            <div style='display: none'>
                <asp:DropDownList ID="drpMessage" runat="server">
                    <asp:ListItem Text='Bạn có chắc chắn muốn xóa bản ghi này không?' Value='0'></asp:ListItem>
                    <asp:ListItem Text='Bạn có chắc chắn muốn xóa bản đã chọn?' Value='1'></asp:ListItem>
                    <asp:ListItem Text='Bạn phải chọn ít nhất một bản ghi.' Value='2'></asp:ListItem>
                </asp:DropDownList>
                <asp:HiddenField ID="hidID" Value="0" runat="server" />
                <iframe src="../../menu.htm" id="expFile"></iframe>
            </div>
        </div>
    </div>
</div>
